package b2.config
{
	public class FortressConfig
	{
		//索引
		public var index:int;
		//要塞名称
		public var name:String;
		//战役列表
		public var campIndex:Array;
		//图标
		public var iconImage:String;
		//图标位置X
		public var iconPosX:Number;
		//图标位置Y
		public var iconPosY:Number;
		//要塞格子图像
		public var tileImage:String;
		//要塞战斗背景
		public var battleBgr:String;
		//要塞战斗背景颜色滤镜
		public var battleBgrFilter:Array;
		//需要等级 
		public var requireLevel:int;
		//英雄模式
		public var heroMode:Object;
		
		public function FortressConfig(fortressXML:XML)
		{
			index = fortressXML.index;
			name = fortressXML.name;
			campIndex = fortressXML.campIndex.split(",");
			iconImage = fortressXML.iconImage;
			iconPosX = fortressXML.iconPosX;
			iconPosY = fortressXML.iconPosY;
			tileImage = fortressXML.tileImage;
			battleBgr = fortressXML.battleBgr;
			if (fortressXML.battleBgrFilter != undefined)
				battleBgrFilter = fortressXML.battleBgrFilter.split(",");
			requireLevel = fortressXML.requireLevel;
			//英雄模式
			heroMode = new Object();
			//掉落战场物品几率降低
			heroMode.dropPossibilityDecrease = fortressXML.heroMode.dropPossibilityDecrease;
			//掉落战场奖品概率提高
			heroMode.prizePossibilityIncrease = fortressXML.heroMode.prizePossibilityIncrease;
			//掉落装备等级提高
			heroMode.equipLevelIncrease = parseInt(fortressXML.heroMode.equipLevelIncrease);
			//掉落勋章等级提高
			heroMode.medalLevelIncrease = parseInt(fortressXML.heroMode.medalLevelIncrease);
			//消耗英雄之证数目
			heroMode.heroVertCostNum = parseInt(fortressXML.heroMode.heroVertCostNum);
			//敌军等级提高
			heroMode.enemyLevelIncrease = parseInt(fortressXML.heroMode.enemyLevelIncrease);
			//BOSS等级提高
			heroMode.enemyBossLevelIncrease = parseInt(fortressXML.heroMode.enemyBossLevelIncrease);
		}

	}
}